#ifndef __MESSAGECODE_H__
#define __MESSAGECODE_H__
<#list modules as module>
	<#list module.classes as class>
#include "${class.className?cap_first}.h"
	</#list>
</#list>
class MessageCode{
public:
<#list modules as module>
/**********************************************************
 *协议id：${module.id}
 *协议号：${module.code}
 *协议名称：${module.name}
 **********************************************************/
<#list module.classes as class>
	/**${class.className?cap_first}---${class.code}---${class.classDesc}*/
	 static const short ${class.className?cap_first}_CODE=${class.code};
</#list>
</#list>
	static BaseMessage* createMessage(short type){
		BaseMessage* msg;
		switch(type){
	<#list modules as module>
		<#list module.classes as class>
		case ${class.className?cap_first}_CODE:	/**${class.className?cap_first}---${class.code}---${class.classDesc}*/
		msg=new ${class.className?cap_first}();
		break;
		</#list>
	</#list>
		default:
			CCLOG("this type is not have message;[code=%d]",type);
		break;
		}
		return msg;
	}
};
#endif